import { createApp } from 'vue'
import App from './App.vue'
// 定义样式
import "normalize.css"
// 引入路由实例
import router from './router'
// 引入仓库实例
import store from "./store/index"
// 完整引入
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// element国际化简写中文语言包
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'


// 把通用的组件全局注册
import TablePro from "@/components/table-pro/index.vue"

// 创建根实例
const app = createApp(App)

// 使用路由
app.use(router)

// 使用库
app.use(store)

//注册组件
app.component("TablePro",TablePro)


// 使用element-plus
app.use(ElementPlus, {
    locale: zhCn,
  })

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 app.component(key, component)
  }
// 挂载
app.mount('#app')
